# MakeBy: LiuBoyuan
from pydantic import BaseModel, Field


class UserBaseMixin(BaseModel):
    class Config:
        orm_mode = True


class tokenMixin(BaseModel):
    token: str = Field(None, description="前端令牌")

    class Config:
        orm_mode = False


class UserIdMixin(UserBaseMixin):
    id: int = Field(0)


class UserInfoSchema(UserIdMixin):
    sign: str = Field(None, description="用户自定义的签名")
    headimage: str = Field(None)
    userinit: int = Field(None)
    user_top_image: str = Field(None)
    offset_top : int =Field(None)

class UserNameMixin(UserBaseMixin):
    username: str = Field(None)


class UserPrivateMixin(UserBaseMixin):
    password: str = Field(None)


class UserFormSchema(UserPrivateMixin, UserNameMixin):
    ...


class UserAddSchema(UserInfoSchema): ...


class UserRetSchema(UserNameMixin, UserInfoSchema):
    ...


class UserSchema(UserRetSchema, UserFormSchema):
    ...
